;;; hm--html.el:
;;; v5.82; 5 Sep 1995
;;; Copyright (C) 1993, 1994, 1995 Heiko Muenkel
;;; email: muenkel@tnt.uni-hannover.de
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2, or (at your option)
;;; any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;;;
;;;
;;; Description:
;;;
;;; Defines functions for the file hm--html-menu.el.
;;;
;;; Installation:
;;;
;;; Put this file in one of your load path directories.
;;;
(provide 'hm--html)
(require 'hm--date)
(require 'adapt)
(defconst hm--html-menus-package-maintainer "muenkel@tnt.uni-hannover.de")
(defconst hm--html-menus-package-name "hm--html-menus")
(defconst hm--html-menus-package-version "4.14")
;;; Functions for adding html commands which consists of a start and a
;;; end tag and some text between them. (Basicfunctions)
(defun hm--html-add-tags (function-insert-start-tag
start-tag
&optional function-insert-end-tag
&optional end-tag
&optional function-insert-middle-tag
&optional middle-tag)
"Adds the start and the end html tag at point.
The first parameter specifies the funtion which insert the start tag
and the third parameter specifies the function which insert the end tag.
The second parameter is the string for the start tag and the fourth parameter
is the string for the end tag. The third and fourth parameters are optional.
The fifth parameter is optional. If it exists, it specifies a function which
inserts the sixth parameter (the middle-tag) between the start and the end
tag."
; (interactive "aFunction, which adds the HTML start tag: \n\
;aFunction, which adds the HTML end tag: \n\
;sThe HTML start tag: \n\
;sThe HTML end tag: ")
(eval (list function-insert-start-tag start-tag))
(if function-insert-middle-tag
(eval (list function-insert-middle-tag middle-tag)))
(if function-insert-end-tag
(let ((position (point)))
(eval (list function-insert-end-tag end-tag))
(goto-char position))))
(defun hm--html-add-tags-to-region (function-insert-start-tag
start-tag
function-insert-end-tag
end-tag
&optional function-insert-middle-tag
&optional middle-tag)
"Adds the start and the end html tag to the active region.
The first parameter specifies the funtion which insert the start tag
and the third parameter specifies the function which insert the end tag.
The second parameter is the string for the start tag and the fourth parameter
is the string for the end tag.
The fifth parameter is optional. If it exists, it specifies a function which
inserts the sixth parameter (the middle-tag) between the start and the end
tag."
; (interactive "aFunction, which adds the html start tag: \n\
;aFunction, which adds the html end tag: \n\
;sThe HTML start tag: \n\
;sThe HTML end tag: ")
(save-window-excursion
(let ((start (region-beginning))
(end (region-end)))
(goto-char end)
(eval (list function-insert-end-tag end-tag))
(goto-char start)
(eval (list function-insert-start-tag start-tag))
(if function-insert-middle-tag
(eval (list function-insert-middle-tag middle-tag)))
)))
(defun hm--html-insert-start-tag (tag)
"Inserts the HTML start tag 'tag' without a Newline.
The parameter must be a string (i.e. \"\")"
(let ((start (point)))
(insert tag)
(html-maybe-deemphasize-region start (- (point) 1))))
(defun hm--html-insert-end-tag (tag)
"Inserts the HTML end tag 'tag' without a Newline.
The parameter must be a string (i.e. \"\")"
(let ((start (point)))
(insert tag)
(html-maybe-deemphasize-region start (- (point) 1))))
(defun hm--html-insert-start-tag-with-newline (tag)
"Inserts the HTML start tag 'tag' with a Newline.
The parameter must be a string (i.e. \"
\")"
(let ((start (point)))
(insert tag)
(html-maybe-deemphasize-region start (- (point) 1)))
(insert "\n"))
(defun hm--html-insert-end-tag-with-newline (tag)
"Inserts the HTML end tag 'tag' with a Newline.
The parameter must be a string (i.e. \"
\")"
(insert "\n")
(let ((start (point)))
(insert tag)
(html-maybe-deemphasize-region start (- (point) 1))))
;;; Functions which add simple tags of the form
(defun hm--html-add-line-break ()
"Adds the HTML tag for a line break."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag " "))
(defun hm--html-add-horizontal-rule ()
"Adds the HTML tag for a horizontal rule (line)."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag ""))
(defun hm--html-add-paragraph ()
"Adds the HTML tags for a paragraph at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag-with-newline
"
"
'hm--html-insert-end-tag-with-newline
"
"))
(defun hm--html-add-paragraph-to-region ()
"Adds the HTML tags for a paragraph to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
"
"
'hm--html-insert-end-tag-with-newline
"
"))
(defun hm--html-add-paragraph-separator ()
"Adds the tag for a paragraph seperator."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag "
"))
;;; Functions which include something in HTML- documents
(defvar hm--html-url-history-list nil
"History list for the function 'hm--html-read-url'")
(defun hm--html-read-url-predicate (table-element-list usagesymbol)
"Predicatefunction for hm--html-read-url."
(hm--html-read-url-predicate-1 (cdr table-element-list) usagesymbol))
(defun hm--html-read-url-predicate-1 (table-element-list usagesymbol)
"Internal function of hm--html-read-url-predicate."
(cond ((not table-element-list) nil)
((eq (car table-element-list) usagesymbol))
(t (hm--html-read-url-predicate-1 (cdr table-element-list)
usagesymbol))))
(defun hm--html-read-url (prompt &optional
table
predicate
require-match
initial-contents)
"Function prompts for a URL string.
TABLE is an alist whose elements' cars are URL's.
PREDICATE limits completion to a subset of TABLE.
If REQUIRE-MATCH is non-nil, the user is not allowed to exit unless
the input is (or completes to) an element of TABLE.
INITIAL-CONTENTS is a string to insert in the minibuffer before reading.
If INITIAL-CONTENTS is nil, the car of the 'hm--html-url-history-list'
is used instead."
(if table
(completing-read prompt
table
predicate
require-match
initial-contents
hm--html-url-history-list)
(read-string prompt
(if initial-contents
initial-contents
(car hm--html-url-history-list))
hm--html-url-history-list)))
(defun hm--html-read-altenate (url)
"Function reads the value for the \"ALT\"- attribute in IMG tags.
URL will be used as the default URL for the external viewer."
(let ((alttype
(string-to-int
(completing-read
; "0: No ALT atribute, 1: ALT=\"\", 2: ALT=Text, 3: ALT=External Viewer: "
"0: No ALT atribute, 1: ALT=\"\", 2: ALT=Text: "
; '(("0") ("1") ("2") ("3"))
'(("0") ("1") ("2"))
nil
t
"2"))))
(cond ((= alttype 0) nil)
((= alttype 1) "")
((= alttype 2) (read-string
"Text for the ALT attribute: "
(substring (file-name-nondirectory url)
0
(string-match
"\\."
(file-name-nondirectory url)))))
; ((= alttype 3) (concat ""
; (file-name-nondirectory url)
; ""))
)))
(defun hm--html-add-image-bottom (href alt)
"Add an image, bottom aligned."
(interactive (let ((url (hm--html-read-url "Image URL: ")))
(list url (hm--html-read-altenate url))))
(let ((start (point)))
(if alt
(insert "")
(insert ""))
(html-maybe-deemphasize-region (1+ start) (1- (point)))))
(defun hm--html-add-image-middle (href alt)
"Add an image, middle aligned."
(interactive (let ((url (hm--html-read-url "Image URL: ")))
(list url (hm--html-read-altenate url))))
(let ((start (point)))
(if alt
(insert "")
(insert ""))
(html-maybe-deemphasize-region (1+ start) (1- (point)))))
(defun hm--html-add-image-top (href alt)
"Add an image, top aligned."
(interactive (let ((url (hm--html-read-url "Image URL: ")))
(list url (hm--html-read-altenate url))))
(let ((start (point)))
(if alt
(insert "")
(insert ""))
(html-maybe-deemphasize-region (1+ start) (1- (point)))))
(defun hm--html-add-server-side-include-file (file)
"This function adds a server side include file directive in the buffer.
The directive is only supported by the NCSA http daemon."
(interactive "FInclude File: ")
(let ((start (point)))
(if (string= file "")
(error "ERROR: No filename specified !")
(insert "")
(html-maybe-deemphasize-region (1+ start) (1- (point))))))
(defun hm--html-add-server-side-include-command-with-isindex-parameter
(command)
"This function adds a server side include command directive in the buffer.
The include command uses the \"isindex\"- parameter for the specified command."
(interactive (list
(completing-read "Include Command: "
hm--html-server-side-include-command-alist)))
(hm--html-add-server-side-include-command command t))
(defun hm--html-add-server-side-include-command (command &optional srvurl)
"This function adds a server side include command directive in the buffer.
The directive is only supported by the NCSA http daemon.
If SRVURL is t, then the attribute srvurl instead of srv is used for the
include command. With srvurl, the include command uses the \"isindex\"-
parameter for the specified command."
(interactive (list
(completing-read "Include Command: "
hm--html-server-side-include-command-alist)))
(let ((start (point))
(attribute (if srvurl "SRVURL" "SRV")))
(if (string= command "")
(error "ERROR: No command specified !")
(if (= ?| (string-to-char command))
(insert "")
(insert "")
(html-maybe-deemphasize-region (1+ start) (1- (point)))))))
;(defun hm--html-add-server-side-include-command-with-parameter (command
; parameter)
; "This function adds a server side include command directive in the buffer.
;The directive is only supported by the NCSA http daemon."
; (interactive (list
; (completing-read
; "Include Command: "
; hm--html-server-side-include-command-with-parameter-alist)
; (read-string "Parameterlist sepearted by '?': ")))
; (let ((start (point)))
; (if (string= command "")
; (error "ERROR: No command specified !")
; (if (string= parameter "")
; (error "ERROR: No parameter specified !")
; (if (= ?| (string-to-char command))
; (if (= ?? (string-to-char parameter))
; (insert "")
; (insert ""))
; (if (= ?? (string-to-char parameter))
; (insert "")
; (insert "")))
; (html-maybe-deemphasize-region (1+ start) (1- (point)))))))
;;; Functions, which adds tags of the form ...
(defun hm--html-add-bold ()
"Adds the HTML tags for Bold at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-bold-to-region ()
"Adds the HTML tags for Bold to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-italic ()
"Adds the HTML tags for Italic at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-italic-to-region ()
"Adds the HTML tags for Italic to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-underline ()
"Adds the HTML tags for Underline at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-underline-to-region ()
"Adds the HTML tags for Underline to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-definition ()
"Adds the HTML tags for Definition at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-definition-to-region ()
"Adds the HTML tags for Definition to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-code ()
"Adds the HTML tags for Code at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-code-to-region ()
"Adds the HTML tags for Code to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-citation-to-region ()
"Adds the HTML tags for Citation to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-emphasized-to-region ()
"Adds the HTML tags for Emphasized to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-fixed-to-region ()
"Adds the HTML tags for Fixed to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-keyboard-to-region ()
"Adds the HTML tags for Keyboard to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-sample-to-region ()
"Adds the HTML tags for Sample to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-strong-to-region ()
"Adds the HTML tags for Strong to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-variable-to-region ()
"Adds the HTML tags for Variable to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-comment ()
"Adds the HTML tags for Comment at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""))
(defun hm--html-add-comment-to-region ()
"Adds the HTML tags for Comment to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""))
(defun hm--html-add-preformated ()
"Adds the HTML tags for preformated text at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag-with-newline
"
"
'hm--html-insert-end-tag-with-newline
"
"))
(defun hm--html-add-preformated-to-region ()
"Adds the HTML tags for preformated text to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
"
"
'hm--html-insert-end-tag-with-newline
"
"))
(defun hm--html-add-plaintext-to-region ()
"Adds the HTML tags for plaintext to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
""
'hm--html-insert-end-tag-with-newline
""))
(defun hm--html-add-blockquote-to-region ()
"Adds the HTML tags for blockquote to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
"
"
'hm--html-insert-end-tag-with-newline
"
"))
(defun hm--html-add-abstract ()
"Adds the HTML tags for abstract text at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag-with-newline
""
'hm--html-insert-end-tag-with-newline
""))
(defun hm--html-add-abstract-to-region ()
"Adds the HTML tags for abstract text to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
""
'hm--html-insert-end-tag-with-newline
""))
(defun hm--html-add-strikethru ()
"Adds the HTML tags for Strikethru at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-strikethru-to-region ()
"Adds the HTML tags for Strikethru to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-superscript ()
"Adds the HTML tags for Superscript at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-superscript-to-region ()
"Adds the HTML tags for Superscript to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-subscript ()
"Adds the HTML tags for Subscript at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-subscript-to-region ()
"Adds the HTML tags for Subscript to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-quote ()
"Adds the HTML tags for Quote at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-quote-to-region ()
"Adds the HTML tags for Quote to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-person ()
"Adds the HTML tags for Person at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-person-to-region ()
"Adds the HTML tags for Person to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-instance ()
"Adds the HTML tags for Instance at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-instance-to-region ()
"Adds the HTML tags for Instance to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-option ()
"Adds the HTML tags for Option at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-option-to-region ()
"Adds the HTML tags for Option to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-publication ()
"Adds the HTML tags for Publication at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-publication-to-region ()
"Adds the HTML tags for Publication to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-author ()
"Adds the HTML tags for Author at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-author-to-region ()
"Adds the HTML tags for Author to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-editor ()
"Adds the HTML tags for Editor at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-editor-to-region ()
"Adds the HTML tags for Editor to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-credits ()
"Adds the HTML tags for Credits at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-credits-to-region ()
"Adds the HTML tags for Credits to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-copyright ()
"Adds the HTML tags for Copyright at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-copyright-to-region ()
"Adds the HTML tags for Copyright to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-isbn ()
"Adds the HTML tags for ISBN at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-isbn-to-region ()
"Adds the HTML tags for ISBN to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-acronym ()
"Adds the HTML tags for Acronym at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-acronym-to-region ()
"Adds the HTML tags for Acronym to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-abbrevation ()
"Adds the HTML tags for Abbrevation at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-abbrev-to-region ()
"Adds the HTML tags for Abbrev to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-command ()
"Adds the HTML tags for Command at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-command-to-region ()
"Adds the HTML tags for Command to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-argument ()
"Adds the HTML tags for Argument at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-argument-to-region ()
"Adds the HTML tags for Argument to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-literature ()
"Adds the HTML tags for Literature at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-literature-to-region ()
"Adds the HTML tags for Literature to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-footnote ()
"Adds the HTML tags for Footnote at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-footnote-to-region ()
"Adds the HTML tags for Footnote to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-margin ()
"Adds the HTML tags for Margin at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
(defun hm--html-add-margin-to-region ()
"Adds the HTML tags for Margin to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag
""
'hm--html-insert-end-tag
""))
;;; Lists
(defun hm--html-add-listing-to-region ()
"Adds the HTML tags for listing to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
""
'hm--html-insert-end-tag-with-newline
""))
(defun hm--html-add-numberlist ()
"Adds the HTML tags for a numbered list at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag-with-newline
""
'hm--html-insert-end-tag-with-newline
""
'hm--html-insert-start-tag
"
"))
(defun hm--html-add-numberlist-to-region ()
"Adds the HTML tags for a numbered list to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
""
'hm--html-insert-end-tag-with-newline
""
'hm--html-insert-start-tag
"
"))
(defun hm--html-add-directory-list ()
"Adds the HTML tags for a directory list at the point in the current buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-start-tag-with-newline
""
'hm--html-insert-end-tag-with-newline
""
'hm--html-insert-start-tag
"
"))
(defun hm--html-add-directorylist-to-region ()
"Adds the HTML tags for a directory list to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
""
'hm--html-insert-end-tag-with-newline
""
'hm--html-insert-start-tag
"
"))
(defun hm--html-add-list-to-region ()
"Adds the HTML tags for a (unnumbered) list to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
"
"
'hm--html-insert-end-tag-with-newline
"
"
'hm--html-insert-start-tag
"
"))
(defun hm--html-add-menu-to-region ()
"Adds the HTML tags for a menu to the region."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
""
'hm--html-insert-start-tag
"
"))
(defun hm--html-add-description-list-to-region ()
"Adds the HTML tags for a description list to a region.
It also inserts a tag for the description title."
(interactive)
(hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
"
"
'hm--html-insert-end-tag-with-newline
"
"
'hm--html-insert-start-tag
"
"))
(defun hm--html-add-description-title ()
"Adds the HTML tag for a description title at current point in the buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-end-tag-with-newline
"
"))
(defun hm--html-add-only-description-entry ()
"Adds the HTML tag for a description entry at current point in the buffer."
(interactive)
(hm--html-add-tags 'hm--html-insert-end-tag-with-newline
"